Channel utilization method and system for ISDN

ABSTRACT

An ISDN gateway (GW, 100) dynamically allocates bandwidth by monitoring traffic at each destination queue and in response allocating or deallocating virtual B-channels. A long term allocation (LTA) algorithm is executed during usual traffic conditions to determine when, and for how long, virtual B-channels are to be allocated. During transient conditions, the gateway (GW, 100) executes a short term allocation (STA) algorithm. Bandwidth utilization is optimized by packaging data packets into trains that are transmitted to the destination when the train is completed and upon satisfaction of other conditions. Each train undergoes data compression by execution of a suitable compression algorithm.

TECHNICAL FIELD

The present invention relates generally to channel utilization in dataand voice communication systems, and more particularly to optimizingchannel utilization in Integrated Services Digital Networks (ISDN).

BACKGROUND ART

ISDN is a relatively newly developed and emerging field oftelecommunications which integrates computer and communicationstechnologies to provide, worldwide, a common, all-digital network. Thisis based, in part, on standardizing the structure of digital protocolsdeveloped by the International Telegraph and Telephone ConsultativeCommittee (CCITT). Despite the implementation of multiple networkswithin national boundaries, from a user's point of view there is asingle, uniformly accessible, worldwide network capable of handling abroad range of telephone, data and other conventional and enhancedservices.

A complete description of the architecture of ISDN is beyond the scopeof this specification. For details, and for an extensive bibliography ofreferences of ISDN, see Stallings, ISDN, An Introduction, MacMillanPublishing Company, 1989.

An ISDN is structured by architecture closely following the OSI SevenLayer Reference Model. Within the framework of ISDN, the networkprovides services and the user accesses the services through theuser-network interface. A "channel" represents a specified portion ofthe information carrying capacity of an interface. Channels areclassified by two types, Basic Rate ISDN (BRI) and Primary Rate ISDN(PRI). BRI delivers two B-channels, each having a capacity of 64 Kbps,capable of transmitting voice and data simultaneously. A 16KbpsD-channel transmits call control messages and user packet data. PRIprovides twenty three B-channels of 64 Kbps capacity each for carryingvoice, circuit switched data or packet data. The D-channel is a 64Kbpssignaling channel. The B and D channels are logically multiplexedtogether at Layer 1 of the OSI Reference Model.

With reference to FIG. 1, the conventional ISDN interfaces are depicted.At the customer premises, an "intelligent" device, such as a digital PBXterminal controller or Local Area Network (LAN), can be connected to anISDN terminal TE, such as a voice or data terminal, which is connectedto a Network Termination (NT1). Non-ISDN terminals TE may be connectedto a Network Termination (NT2) [over the RS-232 Interface] and aTerminal Adapter TA. The NT2 in turn is connected over an"S/T-Interface", which is a four-wire bus, to a termination NT1 thatperforms functions such as signal conversion and maintenance of theelectrical characteristics of the loop.

At the local loop, a two-wire bus, termed the "U-Interface", or "Loop",interconnects NT1 and a Loop Termination (LT) at the central office.Finally, the "U-Interface" is a bus between the local loop at thecarrier end and exchange switching equipment. Details of thisarchitecture are provided in ISDN: An Overview, Data Pro Research,Concepts & Technologies, MT 20-365; pp 101-110, published by McGraw HillIncorporated (December 1988).

ISDN can be used to service the needs both of public data telephony andprivate networks. In general, access to public telephone is performed asshown in FIG. 2(a). An initiating host H first issues dialing commandsto the public network to set up a connection with the destination hostH, and then uses the connection to communicate with the destinationhost. The connection either is circuit switched or packet switched. Datacommunication in private networks incorporates routers, genericallycalled Interface Message Processors (IMPs), which may also be used ashosts. In FIG. 3(a), a host A communicating with host C will take anappropriate route through an IMP interface.

To establish communications between a host and the ISDN, a gatewayoperating at the upper layers of the OSI reference model accomplishesgateway functions, translating protocols used on dissimilar networks. AnISDN gateway, designated by GW in FIG. 1, will operate entirely in thedigital domain, carrying out all necessary protocol conversion betweenthe host network and ISDN.

Copending application Ser. No. 08/094,144 to Gagliardi et al. entitled"ISDN Interfacing of Personal Computers", filed on even date herewithand assigned to the assignee of the present invention, describes agateway interconnecting personal computers and the ISDN in a mannershown symbolically in FIG. 2(b). The gateways GW in FIG. 2(b) carry outall necessary protocol conversion to enable the user to transparentlyaccess the ISDN.

A related commonly assigned application Ser. No. 08/094,114 to Gagliardiet al., entitled "Method of and System for Accessing DistributedResources on ISDN", filed on even date herewith, is directed toimplementation of the gateway GW to enable computers interconnected toeach other and to the ISDN to share resources by issuing commands inoperating system commands. One computer can access a storage disk ofanother computer distributed anywhere in a virtual network establishedon the ISDN. Each disk throughout the networks has a unique name bywhich it is accessed. The configuration of the network and number ofcomputers distributed on it are transparent to each user.

In FIG. 3(b), support for existing private networks is transparentlyaccomplished by providing an ISDN gateway GW of a type described incopending application Ser. No. 07/890,588 to Gagliardi et al., entitled"ISDN Interfacing of Personal Computers", which emulates the currentinterface between a host in the private network and the IMPs thatcomprise the network, or by emulating the interface to a fixedpoint-to-point communication link, such as a leased T1 line. Userssimply replace the connections to IMPs to connect to an ISDN gateway.FIG. 3(c) depicts a variation replacing the connection between an IMP orhost and the communication line with that to an ISDN gateway; the IMPsand hosts in this configuration are equivalent.

Copending application Ser. No. 08/094,143 to Gagliardi et al., entitled"ISDN Interfacing of Local Area Networks", filed on even date herewithand assigned to the common assignee, describes a gateway supportinginterconnection among hosts on the ISDN to form a "virtual". A localarea network, or LAN, provides a cluster of interconnected hosts(computers), or nodes, on a medium. Each node can communicate with everyother node; the network requires no central node or computer. Base bandLAN systems, such as Ethernet, impress data signals directly on thenetwork medium, whereas broad band systems modulate a very highfrequency carrier with the data signal before impressing it on themedium. The architecture of each LAN conforms with the OSI referencemodel. Other physical media standards include Token Ring and Token Bus.Several different network operating systems have been adopted by theindustry.

FIG. 4 depicts utilization of one type of gateway GW described incopending application entitled "ISDN Interfacing of Local Area Networks"for interconnecting a number of hosts to form a virtual LAN. Avariation, shown in FIG. 5, provides ISDN gateways GW to interconnect toLANs of a common type or of different types using a common namingconvention. In FIG. 6, a remote host H is connected to a pair of hostsresiding on a LAN through first and second gateways GW at the host andLAN branches of the ISDN. The hostside gateway GW1 is of a typedescribed in the copending application entitled "ISDN Interfacing ofPersonal Computers". The LAN side gateway GW2 in the Figure is of a typedescribed in the copending application entitled "ISDN Interfacing ofLocal Area Networks".

Interconnection of hosts with a LAN facility or forming a virtual LAN isbased on our discovery that point-to-point communications on the ISDN isof the same order of magnitude as that of a high speed local areanetwork. This discovery is counterintuitive, as the nominal throughputof an ISDN is 64 Kbps whereas that of a local area network is in therange of between 10 and 16 Mbps. Accordingly, it would appear thatinterconnecting a LAN to an ISDN would not be feasible from aperformance point of view.

One factor underlying this surprising "natural" performance adaptationbetween Mbps LANs and Kbps ISDN is due to a number of factors. Onefactor is the very significant difference between actual point-to-pointLAN throughput an LAN rated bandwidth. For example, the throughput of a10 Mbps Ethernet-based LAN typically ranges from 56 to 79 Kbps, lessthan the capacity of a single ISDN B- channel. Our observations indicatethe surprising result that while the very large bandwidth canaccommodate many simultaneous point-to-point sessions, it is fullycompatible for the ISDN to provide long distance interlinking for suchsessions.

In general, utilization of bandwidth between hosts on any network isvery inefficient. In a file transfer operation, a large amount of datatypically is transferred from one computer to another in a singlecontinuous operation. This can occur when a local computer requires alocal copy of remote data or updates a remote centralized data bank withfresh local data. Data transfer may be in the form of a data calllasting at least several hours, with bursts of from 100,000 to 1,000,000bytes being transferred every ten to twenty minutes. Such an applicationutilizes the communication link with a duty cycle which is in the rangeof 30 to 2 seconds, assuming that the operating system of the LAN iscapable of transferring 30 to 50 Kbps. In this example, file transferresults in very low channel utilization, on the order from less than onepercent to slightly greater than five percent. Channel utilization fordata base query and transaction processing similarly is on the order ofmuch less than one percent.

Disclosure of the Invention

Accordingly, one object of the invention is to improve channelutilization for transmission of data through an ISDN.

Another object is to optimize utilization of ISDN B-channels toindividual computers or a local area computer network.

Yet another object is to flexibly allocate bandwidth in an ISDN,avoiding arbitrary limits permitted for various types of data transfer.

The above and other objects are satisfied by dynamically expanding thebandwidth allocated to an end user connection by using multiple ISDNB-channels simultaneously, and to adapt the allocated bandwidth to meetuser requirements. A B-channel algorithm automatically determines whento allocate B-channels, how many to allocate and for how long. Thisenables transparent selection of available B-channels to provide thenecessary bandwidth for different size file transfers.

In accordance with another aspect of the invention, the channelallocation algorithm comprises two components, a long term allocator anda short term allocator. The long term allocator monitors recent trafficpattern to and from a destination and decides upon the bandwidth andtypes of channels to be allocated to that destination. The short termallocator monitors the current size of the destination queues and theaging constraints of those queues, and decides whether to temporarilydeviate from the decisions of the long term allocator in order torespond to situations that are not well handled by it. An example istemporary or sudden surge of traffic to certain destinations notpredicted based on the long term allocator algorithm.

In a preferred embodiment, long term allocation forms virtual B channelsout of a B channel pool to allocate, deallocate or replace a channel soas to dynamically alter bandwidth. Each virtual channel, controlled by acorresponding processor, is operative in activated, deactivated,transient or steady states.

There furthermore are two multiplexing modes, a restricted mode and aforced load-balancing mode. In the restricted mode, data to betransmitted is sequentially distributed, one packet at a time in around-robin fashion over the activated virtual channels. A far-endvirtual processor receives and recovers the data in the same round-robinsequence. In the load-balancing mode, distribution of transmissions overthe channels follows a most-empty-channel-first protocol fortransmission. The data is recovered by scanning global sequence numbersattached to the data, comparing and implementing a trace-back time-outpresentation procedure.

In accordance with a further aspect of the invention, ISDN traffic iscompressed to improve data throughput; typically at least a 2:1compression of data is carried out by the particular compressiontechnique implemented. Examples in the preferred embodiments are basedon run-length encoding and Huffman encoding as well as on variations ofthe Lempel-Ziv algorithms. Other compression techniques are possible.

Another aspect of the invention involves processing of packets by thegateway into "trains" to be shipped to a specific destination over ISDN.These trains may be compressed before transmission. Each train has itsown header including all packing and compression information to be usedby the receiving site to rebuild the original packets and correctlydispatch them. At the receiving sites, the trains are rebuilt into theoriginal packet sequence as a result of numbering applied to each singlepacket.

Accordingly, any ISDN application is enabled with the ability to add ordrop B-channels automatically, based on the amount of trafficencountered. Data throughput between destinations is optimized bypackaging variable numbers of packets in trains, compressing thepackaged data, and transmitting when a train of data packets becomesavailable for transmission.

Still other objects and advantages of the present invention will becomereadily apparent to those skilled in this art from the followingdetailed description, wherein only the preferred embodiment of theinvention are shown and described, simply by way of illustration of thebest mode contemplated of carrying out the invention. As will berealized, the invention is capable of other and different embodiments,and its several details are capable of modifications in various obviousrespects, all without departing from the invention. Accordingly, thedrawing and description are to be regarded as illustrative in nature,and not as restrictive.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a simplified circuit diagram of an integrated services digitalnetwork.

FIG. 2(a) is a symbolic diagram showing a conventional public circuit orpacket switched network.

FIG. 2(b) is a symbolic diagram of a network functionally equivalent tothat shown in FIG. 2(a), implemented using ISDN gateways described in acopending application.

FIG. 3(a) is a symbolic diagram of a conventional private network havingprivate IMP interfaces or routers.

FIG. 3(b) is a diagram showing a network functionally equivalent to thatof FIG. 3(a), implemented by ISDN gateways disclosed in a copendingapplication.

FIG. 3(c) is a variation of FIG. 3(b) having a host-IMP interface.

FIG. 4 is a symbolic diagram showing interconnection of multiple hoststhrough ISDN gateways to form a virtual network, described in acopending application.

FIG. 5 is a symbolic diagram showing interconnection of local areanetworks through ISDN gateways, described in another copendingapplication.

FIG. 6 is a symbolic diagram showing interconnection of a remote host toan existing local area network through ISDN gateways.

FIG. 7 is a simplified block diagram showing the hardware architectureof an ISDN gateway provided in accordance with the invention.

FIG. 8 is a diagram of software architecture incorporated in the systemmaster card shown in FIG. 7.

FIG. 9 is a diagram of software architecture shown in one embodiment ofa LAN line card of FIG. 7.

FIG. 10 is a diagram showing software architecture incorporated in anISDN line card shown in FIG. 7.

FIG. 11 is a diagram of software architecture incorporated in the SDLCline card shown in FIG. 7.

FIG. 12 is a diagram showing mapping of software to hardware componentswithin the ISDN gateway.

FIG. 13a is a diagram showing details of the intelligent ISDN managerand device driver shown in FIG. 12.

FIG. 13b is a symbolic diagram of the communication mode adapterincorporated in the ISDN line card of FIG. 12.

FIG. 14 is a flow chart of algorithms for carrying out LTA bandwidthallocation in accordance with an aspect of the invention.

FIG. 15 is a flow chart of algorithms for selecting between LTA and STAchannel allocation.

FIG. 16 is a flow chart of channel processes responding to decisionsmade by both the LTA and STA channel allocation algorithms.

FIG. 17 is a diagram showing development of a virtual channel and itscomponents.

FIG. 18 is a diagram of components for carrying out LTA channelallocation in accordance with another aspect of the invention.

FIG. 19 is a flow chart describing assembly and compression of packettrains for transmission to a new B-channel.

FIG. 20 is a flow chart showing compression, decompression andresequencing of packets.

FIGS. 21a and 21b are diagrams respectively of a packet and a dataframe.

FIG. 22 depicts a train of packets in accordance with a further aspectof the invention.

BEST MODE FOR PRACTICING THE INVENTION

The invention provides dynamic bandwidth allocation in an ISDN gatewayby allocating B-channels automatically in response to traffic monitoredat each destination on the ISDN. Packets are packaged into trains,shipped to a destination when a train having a predetermined packetlength becomes available. Data embedded in the trains is compressed forefficient bandwidth utilization.

Network Overview

Referring to FIG. 7, an ISDN gateway 100, in accordance with theinvention, comprises four hardware elements 102, 104, 106, 108interconnected by a common bus 110. The elements 102-108 preferablycomprise individual circuit cards, although some or all of the elementsmay be incorporated in a single circuit board. The board or boardspreferably reside within a personal computer but alternatively mayreside outside the computer.

Element 102 is a system master which implement infrequent userfunctions, such as configuration management and connection requests. Thesystem master 102 furthermore functions as a standard computingplatform, emulating an IBM compatible PC or other computer standard.

LAN line card 104 implements firmware and hardware for specific IEEE 802physical and data link protocol together with software carrying out hostfiltering. Different LAN line cards with corresponding protocols will berequired for other LAN connections, e.g., 802.5 Token Ring and 802.3Ethernet.

ISDN line card 106 comprises firmware and hardware implementing the ISDNphysical, data link layer (LAPD), and the D-channel layer 3 protocol,and the physical layer of the B-channel. Software incorporated in theISDN line card 106 implements train protocol and B-channel allocationalgorithms as well as data compression algorithms to support a virtualbroad band capability of the gateway, also to be described later.

SDLC line card 108 includes firmware and hardware to implement the SNAphysical and data link (SDLC) layers. This card is optional to thenetwork.

The contents of elements 102-108 are described in more detail withreference to FIGS. 8-20. Hardware and software incorporating importantaspects of the invention are integrated in ISDN line card 106.

Software Architecture

The software architecture of system master element 102, shown in FIG. 8,is configured with three layers of software underlying the system master102(b) in a stack. The underlying layers comprise call requestmanagement, configuration management and monitoring, 102(b), as well aslayers 102(c), 1O2(d) for implementing a computing platform.

In FIG. 9, the software architecture of one embodiment of a LAN linecard (LLC) 104 for 802.5 Token Ring comprises a functional layer 104(a)together with a layer 104(b) comprising a host filter, receiving andselectively processing packets addressed to the host, as well asunderlying layers 104(c), 104(d) implementing the specific IEEE 802physical and data link protocol (802.5) for Token Ring.

In FIG. 10, the software architecture of the ISDN line card 106comprises a functional layer 106(a), together with underlying layers106(b)-106(f) for carrying out the requirements of the OSI referencemodel layers associated with the ISDN. These layers include acommunication mode adapter at layer 106(b) (see also FIG. 13a) andprotocol services at layer 106(c). Layer 106d (IIM) carries out gatewaypeer protocol and executing buffer allocation algorithms to be describedin detail later. The peer protocols, applied on B-channels used by thegateway to implement train packing, compression and error handling, isalso described later.

FIG. 11 depicts the software architecture of the SDLC line cardimplementing the SNA physical and data link layers for carrying outinter-networking among hosts.

Mapping of software architecture shown in FIGS. 8-11 to hardwarecomponents of FIG. 7 is symbolized in FIG. 12. Within the system mastercard 102, a USER software module 110 supports user application softwareand protocol stack, residing at layer 7 of the OSI Reference Model.Configuration control manager 112 of the system master monitor bandwidthallocation and errors. The system master 102 specifically managesconfiguration of the gateway, providing status, billing and informationtracing on the use of resources in the gateway, as well as access tointernal tables used by bridging and routing gateway services. Alsoprovided by the system master are network management services and remoteaccess to other system masters in the same interconnected network.

Functions carried out by the system master 102 include updating ofrecords, loaded on disk into memory resident data structures when thesystem is initiated. When these tables are updated, the disk isautomatically updated as well.

Configuration control manager 112 controls parameters which define theresources available to the gateway and the access privileges to thesystem master 102. A connection request manager, incorporated in 112,defines how the gateway relates to other gateways for implementinggateway functions to a personal computer or to define an interconnectedLAN providing a virtual network, described in the copending applicationsentitled "ISDN Interfacing of Personal Computers" and "ISDN Interfacingof Local Area Networks", incorporated herein by reference.

Configuration control manager 112 maintains a configuration table forparameters controlling the operation of the gateway. The table,implemented in software, defines the ISDN configuration including numberof channels allocated to the gateway, characteristics of the channelsand all directory numbers associated with the gateway. Furthermorestored are characteristics of the types of interconnections of the hostside of the network, e.g., RS-232, DMA, etc., and default parameters forincoming calls, e.g., select all non-collect calls, allow collect callswith proper user information and collect calls only from particularnumbers. Level of system monitoring, also retained by the controlconfiguration manager tables, controls available options and enables theamount of overhead associated with those options to be limited. Passwordinformation for access to the gateway and user profiles determining whatkind of activities are allowed to a given user or a class of users alsoare retained in the manager tables.

A connection request manager, included in module 112, controls a tablecontaining information required to set up a B-channel or remote gateway.This information includes at least one remote ISDN number for theconnection and any user information required in the layer 3 set-upmessage. For LAN interconnections, the connection request table definesthe interconnected LAN. During operation of the gateway, this table alsorecords whether the connection is established and provides a handle forthe connection which can be used to direct packets to a destinationmanager.

Configuration control manager 112 collects statistics for B-channels,including channel utilization including a statistical sampling todetermine the percentage of idle capacity on the channel, possibly on aper-connection basis. Since each channel is bi-directional, measurementtakes place both on the outgoing and incoming lines. Information also ismaintained on any delay for packets in the system, as well as on the"high water mark" in the buffer pool for a given destination and thenumber of buffers discarded for a destination due to memory constraints.For channels that are connected, the percentage of frames sent orreceived in errors will also be recorded for use, among other ways todetermine the type of data link protocol applied to a given destination.

Use of the gateway by nodes of an LAN is monitored by a systemadministrator (not shown in FIG. 12) which records the amount of datasent or received by a node on a per-cargo destination basis, the numberof connections initiated due to packets of a given node, and the arrivalrate of packets from a particular node. The system administrator furthermay monitor broadcast or multi-cast transmissions by a particular node,and the number of times a node is not found in tabulated data. To reducethe overhead of monitoring the bridging operation, the systemadministrator restricts monitoring to traffic from specific nodes oruses statistical sampling of all traffic in the gateway.

Whereas the system master card 102 performs the necessary configurationand reconfiguration functions for supporting gateway operations carriedout by intelligent ISDN manager (IIM) 116 in ISDN line card 106, LANcard 104 comprises principally a host filter 114. Upon arrival of apacket from another host within a local LAN, the host filter 114examines the link-level address of the packet. If the packet isaddressed to a local host other than the gateway, the packet isdiscarded. If the packet is addressed to remote hosts covered by abridging service, it is passed to bridger 118 implemented in ISDN linecard 106. If the packet is addressed to the gateway, and the packetindicates a service access point of the gateway protocol services, thenit is passed to gateway services module 120. Finally, if the packet isaddressed to the gateway, and the packet type is not recognized to beany of the service access points of the gateway protocol services, thenit is passed to user module 110 in system master card 102 (LI/B).

More specifically, if the packet is passed to the bridger 118, thepacket is intended to be bridges over to another local area network. Thelink-level address resolved by the bridged 118 using pre-configuredtables. On the other hand, if the packet is passed to gateway servicesmodule 120, the packet is intended to be processed by some gatewayprotocol service programs analogous to those in the user privateprotocol stack in user module 110. The services provided are thosecommonly associated with the network or inter-network layer ofcommunication protocols, including name and address resolution and somelimited form of routing. An example is a simplified re-implementation ofthe network layer of an existing communication protocol. These serviceprograms in turn interact with the IIM 116 to pass data to remote hosts(LI/R).

A packet passed to the user module 110 is meant to be handled by someapplication or protocol software resident on the same node as thegateway. An example of such a program is a private protocol router. Theuser module 110 of system master card 102 interfaces with communicationmode adapter (CMA) 122 of the ISDN line card 104 through a communicationmode adaptor interface 124. The CMA 122 provides various adaptationmodules allowing the user module 110 to interface with destinations,such as a user modem, leased lines or virtual circuit telemetry whichadapts existing USER software and interacts with public or private datanetworks that support virtual circuits.

The architecture of the CMA is depicted symbolically in FIG. 13a. Thegateway services module 120 provides router functions for privateprotocol stacks. Name and address resolutions are performed at the usermodule 110, incorporating existing software of the private protocolstacks or one performed within gateway services module 120. In thelatter case, the gateway services module 120 can be performed of at anexisting private network/inter-network protocol stack, re-implemented asrequired for particular applications.

The intelligent ISDN manager (IIM) 116 receives packets of data andcommands to set up virtual circuits. The IIM 116 implements trainpackaging and B-channel allocation as well as data compression, formingimportant aspects of the invention. The content and operation of IIM 116are described in detail hereinafter.

Bridger 118 operates at the 802 medium access (MAC) layer between LANsor single nodes. This module is used to create a much larger "virtualLAN" out of an arbitrary number of LANs and single nodes, described incopending application entitled "ISDN Interfacing of Local AreaNetworks". An 802 MAC level bridge as a method to interconnect level 2networks in this regard is particularly advantageous for severalreasons. First, providing a connection at the MAC level ensures that allhigher level protocols available across connected LANs will continue towork in a virtual LAN with no modification, and that networkapplications based on these higher level protocols will also operate inthe same manner. A bridge in this respect supports many types of networksystems on different LANs.

Furthermore, once the bridge has determined that a remote conversationis underway, forwarding of remote 802 packets is achieved on the orderof 100 instructions, whereas network level routing generally requires onthe order of several thousand instructions. This means that bridges ingeneral can handle an order of magnitude more packets using the sameprocessing power.

Finally, MAC level bridges operate in a connectionless mode and dependon high quality transmission lines to minimize retransmissionscontrolled by higher level protocols on an end-to-end basis. Networkrouters tend to require much more overhead, because they operate inconnection mode and in view of to the number of control messagesrequired to allow for a dynamic routing. Given the disparity betweenISDN bandwidth and LAN bandwidths, the ability to minimize the overheadneeded to manage the LAN connection is considerable.

Peer protocol implemented by IIM 116 ensures that data packets arrive tothe remote gateway in the same order as they were received by the localgateway. Peer protocol provides a transport level surface to sequenceall packets for this purpose.

The term "packet sequence", as used herein, refers to an ordered seriesof packets sharing a common source/destination pair; the series may ormay no be continuous. For example, if a gateway on a first LAN receivesa series of packets with the same source and destination, after thepackets are shipped to a gateway on a second LAN the packets arereleased as a packet sequence in the same order with or withoutdiscarded packets. Packet sequencing does not ensure that all packetsfrom the first LAN to the second will be placed on the second LAN in theoriginal order, only that the order to a particular source/destinationpair will be the same.

To support packet sequences, a header is added to each 802 packetidentifying packet type, the sequence number for the packet and thepacket size. Although 802.3 packets already have a length field, 802.5packets do not so that peer protocol as implemented herein must provideone.

Train Packaging

Packet sequences are mapped into cargo destinations, with many packetsequences being designated to a single cargo destination. Mapping ofpacket sequences to cargo destinations is supported by system master110. Of particular importance, a cargo destination is divided into manytrains of a format shown in FIG. 22 in accordance with an aspect of theinvention. A train contains an integral number of packets. There is nolimit to the size of a train, although the size is predetermined and allgateways preferably use the same maximum train size so that fixed sizebuffers can be implemented.

The content of a train is compressed in accordance with another aspectof the invention, then "framed" by adding start and stop sequences, achecksum and other frame control information. Peer protocol preferablyspecifies the description of a frame, including details of the frameheader and data fields. This model enables the peer protocol to operateat three different levels, PS packets (803 packets having a PS header),trains and frames. The following diagram shows transformations that apacket undergoes both as a packet arrives to a gateway from a local areanetwork and as the packet is transferred back to a different local areanetwork:

    ______________________________________                                        802.5 LAN 1                                                                   (full 802.5 frame)                                                            GW Lan Card                                                                   (802.5 packet stripped                                                        of fields not covered                                                         by the checksum)                                                              Packet Sequence Builder                                                       (PS header +                                                                  stripped 802.5)                                                               Train Builder                                                                 (buffer of PS packets)                                                        Destination Known                                                             Frame Builder                                                                 (Frame Header +                                                               compressed Train (bit array) +                                                Frame Trailer)                                                                B Channel                                                                     64Kbs bit stream                                                              ISDN                                                                          ______________________________________                                    

FIG. 21a shows a PS packet comprising the following fields: PT (packettype), PSN (Packet Sequence Number), LEN (Length of Stripped Packet) andData. A data frame format, shown in FIG. 21b as another alternative,comprises the following fields: FS (Frame Start), FT (Frame Type), FSN(Frame Sequence Number), FC (Frame Control), Data, FCS (Frame Checksum)and FE (Frame End).

The following example showing packet processing as the packets are movedfrom a first LAN to a second LAN assumes use of the gateway as a bridgeat the 802 medium access control level (MAC), the following is adescription of packet processing as the packets are moved from a firstLAN to a second LAN. With reference to FIGS. 12 and 13(b), packetsaddressed to the gateway are forwarded to the system master 102; packetsaddressed to other nodes on LAN 1 are discarded, and all other packetsare passed to the packet sequence manager. Complete 802.5 packets arebuilt by adding start of frame and end of frame fields, completing thehost filter 114 functions.

Calls from a cargo destination manager determine the cargo destinationfor the received packet. The size each queue and the hold time of eachqueue not being serviced by the train builder is communicated to theB-channel allocation manager (FIG. 13(b)). The PS header has a packetsequence number to each packet, and the initial packet in a sequence isassigned sequence number 1. The PS header is removed from the 802packet, checked and may be discarded.

Assuming the packet is valid, it is sequenced as follows. If the packetsequence number is 1, the bridge manager is notified that a newconversation with a remote node has been initiated by the remote node,and the bridge manager will update the bridge data base. If the sequencenumber is not 1, the number is checked to see if there was a gap fromthe last packet received. If a gap exists, the packet is queued, and atimer is set. If the missing packet arrives before the timer expires,the queue is re-ordered, and the packets are released in order.Otherwise, the number of received packet is recorded, and the packet isreleased. If a packet with a lower sequence number subsequently arrives,it is discarded. The 802 packet type is checked and 802 protocoltranslation is carried out if necessary, i.e., translating an 802.3packet to an 802.5 packet.

The train builder requests packets from the cargo destination manager,allocates and fills buffers and maintains the number of bytes used inthe buffer. Received buffers are unpacked and passed to the level aboveafter being parsed to ensure that no error in transmission has occurred.A compressor compresses the input buffer using a compression algorithmin a manner to be described later. Incoming data is decompressed andtested to confirm that it will fit in a new buffer; if not, an error isindicated.

In frame management, a data frame is built by adding a frame header andtrailer to the active bits in the buffer. The B-channel allocationmanager indicates when the frame control bits should be set to "lastframe". The frame is gated onto the B-channel for the destination foundin the buffer control block. The buffer is freed after being gated tothe B-channel. For incoming data, a buffer is allocated for the arrivingframe. The frame is checked using the FCS, and any frames in error arediscarded. Control frames are supplied to the system master. Data framesare supplied to the compression manager, and the B-channel allocationmanager receives a "last frame" setting in the frame control (FC) field.

An important aspect of the invention is B-channel allocation,implemented by an allocation algorithm to maximize utilization of thechannels, minimize response times and the probability of losing datapackets due to buffer overflow. The channel allocation algorithm,residing within the B-channel manager of IIM 116 (FIG. 12), includescommands to establish user-level connections to destinations and to sendand receive data. Data passed to the IIM 116 is queued in destinationqueues. The channel allocation algorithm monitors the status of thedestination queues, and dynamically allocates ISDN channel bandwidth tothese queues. The following definitions support the channel allocationalgorithm.

A "destination", which is a connection at the gateway level, typicallycoincides with a physical gateway. If peer protocol is compatible, alluser-level connections of various types, such as virtual circuit, modemconnections, LAN, packets, etc., can multiplex within the same gatewayconnection. If the peer gateways are incompatible, multiplegateway-level connections to a single physical gateway are necessary.

Associated with each destination is a "destination queue", denoted asQ(d), consisting of a pool of buffers. The pool of buffers fordestination d comprises the messages destined for d. The number ofbuffers in Q(d) is denoted as b(d); it is assumed that B-channels outputfrom or input to a buffer in parallel, with each buffer having a fixedmaximum size.

A number of B-channels currently allocated to a destination B is denotedas B(d). If a queue Q(d) becomes too long relative to the number ofchannels allocated to d, an extra channel is allocated. On the otherhand, if Q(d) is relatively short compared to the size of B(d), somechannels are released. If no buffers are available for accumulation of anew train at a destination d, a "buffer fault" is created.

Events that define the length of a packet train rigger the invocation ofthe buffer allocation algorithm these events comprise packet arrivals atISDN line card 106 for transmission to the public network. There arefour conditions that must be considered:

1. If a destination d is known, and Q(d) contains an "open" buffer, thatis, a buffer that is not filled to the maximum length, the packet isaccumulated into the train.

2. If the destination d is kown, but no "open" buffer is available inQ(d), a new buffer is created and a new train is started.

3. If the destination d is known, but an "open" buffer is about to fillup, the packet is accumulated in the current open buffer. Thereafter,the buffer is closed to seal the train.

4. If destination d is unknown, a new buffer pool is started for a newtrain.

The channel allocation algorithm, in accordance with the invention,operates asynchronously to the buffer allocation algorithm describedpreviously. As one important aspect of the invention, the channelallocation algorithm is portioned into two components, long termallocation and short term allocation.

Long Term Channel Allocation

Long term allocation monitors the recent historical track pattern to andfrom a destination, and decides upon the bandwidth and types of channelsto be allocated to that destination. A short term allocation monitorsthe current size of the destination queues and the aging constraints ofthese queues, and decides whether to deviate, temporarily, fromdecisions of the long term allocation algorithm. This enables responseto situations that are not well-handled by long term allocation, e.g.,situations arising due to a temporary or sudden surge of traffic tocertain destinations not predicted based on the long term allocationalgorithm. Decisions on bandwidth allocation produced by the long termand short term allocation algorithms preferably are stored in chargedmemory, and are carried out at convenient intervals by ISDN channelprocesses to be described later.

Channel allocation is described with reference to B-channels, althoughsimilar allocation can be carried out for D-channels as well. Ingeneral, B-channels can be used in a circuit switched mode or in apacket switched mode. The circuit switched mode preferably is used onlyto transmit data between low-traffic destinations in view of therelatively high set-up tear down overhead required. The packet switchedmode is preferable for transmission to destinations with a low-trafficrate if there is a moderate response time requirement. For destinationsthat require higher traffic rate or have more stringent response timerequirements, use of B-channels in the circuit switched mode ispreferable. For destinations that do not have high traffic rate but havevery stringent response time requirements, the B-channels should bededicated in the circuit switched mode and deliberately under utilized.

The long term allocation algorithm (LTA) is summarized in the flow chartof FIG. 14. The traffic rate R at each destination is monitored by asoftware flowmeter, which may be a counter of data quantity arriving atthe destination queue within a particular interval of time. Eachsoftware flowmeter is polled at fixed intervals (w). The flowmeter isread, then reset, and the reading is used by the long term allocator LTAto determine how many B-channels are to be allocated to thatdestination.

One embodiment of a long term allocation algorithm LTA, in accordancewith the invention, is as follows. Referring to FIG. 14, step 150 readsa traffic rate R for a destination d, wherein R is defined as follows.

    r=Max{v.sub.-- in(d, t-w, t)w, v.sub.-- out(d, t-w, t)/w},

where t is the time when the meter is read, v₋₋ in(d, t-w, t) is theaccumulated input traffic volume for destination d between time t andt-w, and v₋₋ out(d, t-w, t) is that for the output queue.

In step 152, an integer x, that is greater than or equal to zero, isfound such that:

    x*hbw.sub.-- cs≦r≦(x+1)*hbw.sub.-- cs

and xB channels in circuit switched mode are allocated to destination d,where hbw₋₋ cs is the achievable bandwidth once set up for a circuitswitched mode B-channel. This number in practice is close to 64 Kbs.

Assuming that residual=r-x*hbw₋₋ cs, step 154 determines whetherresidual is greater than mbw₋₋ cs, where mbw₋₋ cs is the minimumutilization of a circuit switched B-channel, or whether the responsetime is more stringent than moderate (step 156). The term "moderate" isdefined to be the response time that can be offered by a packet switchedchannel. If either condition is true, than one more B-channel isallocated to destination d (step 158).

On the other hand, if 0≦residual≦mbw₋₋ cs and the response timerequirement is moderate or more relaxed than moderate, and traffic issuitable for packet switched channels, a fraction of a packet switchedchannel is allocated to destination d, wherein the fraction f isdetermined as follows.

ebw₋₋ ps=effective bandwidth of a packet switched B channel.

In step 160, if destination d is not reachable by packet switchedchannels, or the packet is not of a nature that is suitably transmittedthrough packet switched channels, and the response time requirement isvery relaxed (step 162), then a fraction of a circuit switched modechannel is allocated to destination d (step 164). The fraction in thisexample is determined by the size of the residual. The notation used inthe above algorithm is as follows.

x, f: decision variables

t, r, residual: state variables

ebw₋₋ ps, hbw₋₋ cw: ISDN performance profile

mbw₋₋ cs, w: algorithm control parameters

response time requirements for packet transmission:

tight:≦260 ms

moderate: between z seconds and 260 ms

very relaxed:≦=z seconds.

In addition, the algorithm is sensitive to the transmission delay ofpacket switched channels and the ISDN call set-up and tear down timesfor circuit switched mode. The former is used to derive a boundarybetween moderate and height response times. The latter is used tocalculate the response times obtainable for time-shared fractionalallocation of B-channels in circuit switched modes, which in turndetermines the value of z which defines the boundary between moderateand very relaxed response time requirements. The basic logic of thealgorithm remains unchanged under different performance profiles.

An important algorithm control parameter is the "meter window" w, whichis selected such that the algorithm is sufficiently sensitive toshort-term fluctuation in traffic intensity but is not too sensitive. Ifw is too small, a very short-termed surge in traffic may result in toomany B-channels allocated and therefore will incur a high set-up/teardown overhead. If w is too large, the algorithm may not be responsiveenough to a short term search, resulting in a fast destination queuebuild-up. An excessive amount of buffer space may be consumed andresponse time may be degraded.

To attenuate sensitivity, a method using weighted averaging of trafficin multiple windows is provided. If a window system W with three windowsw1, w2 and w3 is used, with weights wt1, wt2 and wt3, where the sum ofwt1-wt3 is unity, traffic rate r can be equated to R(d, t, W,) computedas follows: ##EQU1##

With this generalization, to allow the algorithm to be more sensitive toshort term fluctuation and less to the long term pattern, wt1 should beincreased and wt3 decreased, and vice versa. Multiple counters aremaintained for each destination queue using this strategy.

Short Term Channel Allocator

The long term allocation algorithm functions well in cases where thereare sufficient B-channels available and decisions made by the LTA arefeasible. This means that the total number of B-channels allocated bythe LTA is smaller than the total number of B-channels subscribed, andsufficiently smaller such that the probability that an incoming callrequest finds all channels busy is very small, and further that therecent past history in fact represents a good basis for allocation. Whensuch conditions are not met, short term allocation (STA) must beimplemented.

In general, STA makes decisions which override, temporarily, decisionsmade by LTA. Channel processes, described hereinafter, implementdecisions made by LTA under normal circumstances. When a B-channel isjust "freed" from servicing an input and output buffer, the B-channelprocess checks to see if a decision has been made to de-allocatechannels from the destination d. If so, it de-allocates itself and findsa new destination for which a decision has been made by LTA to haveadditional channels allocated. However, when unusual conditions aredetected, such as a destination queue being ignored for too long, or aB-channel process encountering an empty destination queue,self-adjustment may be performed by the B-channel process to executedecisions rendered by STA. Two examples to which STA responds are (1) ifany buffer in the destination queue d is found to exceed an age limit,or (2) if the following quantity exceeds a relative queue size limit:##EQU2## Where: T_(k) (d_(i))=size of kth train for the ith destination

B (d_(i))=no. of B-channels assigned to the ith destination

The above relationship is satisfied when the quantity of data in alltrains to a particular destination exceeds the number of B-channelsassigned to that destination.

Logic implementing execution of the STA is shown in FIG. 15, whereinstep 170 waits until a B-channel is freed from servicing in the inputbuffer and the output buffer, and then waits for an STA condition, suchas the two conditions previously described, to be detected (step 172).LTA is implemented in step 174 unless the STA condition is detected. Inresponse to in STA condition, STA channel allocation is carried out instep 176, and the process continues.

An important aspect of the invention involves the B-channel processeswhich respond to decisions made by both the LTA and STA. Referring toFIG. 16, channel process invocation is triggered in response to end oftrain transmission on any B-channel for input or output traffic. Theseare three different cases in reallocating a recently freed B-channel torelease an emptied buffer to a free buffer pool:

1. The first part of the channel process algorithm at 180 preventslocking out trains associated with low traffic rate destinations, orlocking out incoming call requests. Executing lockout prevention at thefirst part of the algorithm eliminates possibility of lockout. Sincethis part of the algorithm tends to disturb stable allocations ofB-channels to high intensity traffic streams, probability of invocationpreferably is modulated inversely to the number of B-channels assignedto the destination associated with the just freed B-channel.

The probability of invocation is higher if the B-channel is allocatedfractionally to a high number of distinct destinations. Probability ofinvocation is lower if more B-channels have been allocated to the samedestination. In other words, the higher the traffic rate for adestination d, the lower the probability of causing a "wild"de-allocation of one of its B-channels to handle of locked out trains.

Sealed trains are time stamped. A check is made by STA over the entirebuffer pool for all destinations to see if there are trains whose ageexceeds a predetermined age limit. If any are found, absence ofB-channels allocated to their destinations are checked to confirm thattrains are truly locked out. If such a flag is found, the just freedB-channel is associated to all respective destinations, originatingfractional allocations of B-channels, the oldest locked out train isselected and transmitted. A condition wherein the age limit is set at asufficiently high level, and if overall traffic does not exceed thecapacity of the gateway is very rare. This condition must be rare toavoid thrashing in the allocation of B-channels, and must be handled asthe first priority decision to avoid blocking trains associated withvery low packet rates.

2. If any complete train is waiting for a transmission to the samedestination, in step 182 of the flow chart, the B-channel is re-used totransmit it. Giving priority to the same destination re-use of theB-channel minimizes ISDN call overhead.

3. If no complete train is waiting for transmission toward the samedestination, step 184, two subcases are considered. In the firstsubcase, the just freed B-channel is fractionally allocated to ndestinations. The remaining n-1 destinations are checked for waitingtrains, and if one is found the channel is assigned to it fortransmittal. This allows maintenance of "stable" pools of low trafficrate destinations if none are found, the following second subcase isexecuted. If no complete train is waiting for destination d₋₋ sub₋₋ i,Flag₋₋ Queue₋₋ Size is checked, and if set, a new destination d₋₋ sub₋₋j is computed as the one which contains the largest relative queue size.Thereafter, the channel process remains with decisions made by LTA.

Data Compression

Another aspect of the invention provides data compression of packettrains, such as implementation of algorithms based on run-lengthencoding and Huffman Encoding, and variations of Lempel-Ziv algorithms.Run-length encoding refers to replacement of sequences of identicalsource elements by a triple consisting of a special code indicating a"run" of elements, a count of the run length and the repeated element.Huffman encoding translates fixed-sized source elements intovariable-sized codes, where the size of the output code and bits isapproximately the logarithm of the probability of the source element.For some kinds of data, the probabilities of elements are well known andfixed translation tables are available. In more general cases, where thedistribution of source elements is not known, a translation table can becomputed for a sum block of input data, and transferred along with thedata to allow decompression. This requires two passes over the inputduring compression; table size must be significantly smaller than thedata blocks.

The Lempel-Ziv algorithms convert variable-sized input elements, orstrings, into fixed-sized codes. Allowing long input sequences gives thepossibility for higher compression ratios than are possible withfixed-size source element algorithms, such as Huffman encoding. TheLempel-Ziv algorithms are adaptive in that translation tables are builtdynamically to reflect characteristics of the input, but require only asingle pass during encoding. Decompression can be performed bydynamically building the same translation tables as were used duringcompression, using information implicit in the encoded data stream suchas whether a particular code has been encountered.

The typical ranges of compression ratios of a compression algorithmselected to compress packet trains vary from about unity for certainkinds of inherently random data such as floating point data orpreviously compressed data, to eight for some data bases containinglarge amounts of redundant or null data. The average compression ratiosover mixed input types depends on the chosen samples, but ratios ofbetween two and four for fairly large samples of mixed input found onreal computer systems are common; two is proposed as an example in thepreferred embodiment.

Error detection and correction, as a surrounding protocol on compresseddata to allow non-delivery of corrupted blocks, is required since anyerrors lead to catastrophic corruption of the rest of the packet train.ISDN error rates appear to be similar to LAN error rates. No additionalerror handling mechanisms are required above those that already exist:in LAN software. The D-channel has built-in error protection by virtueof using the HDLC protocol which includes error detection, packetsequencing and re-transmission.

In accordance with an aspect of the invention, shown in FIG. 18, acontroller 170 comprises a virtual B Allocator/Resource Manager 172which opens a virtual B-channel with control attributes in table I belowfrom the B-channel pool as requested. Manager 172 also assigns a virtualB processor 174 implemented from among a plurality of such processors,and handles related supporting global resources. The virtual Bprocessors 174 at run time or initialization time provide the service oftransparent addition and deletion of new or existing component channelsin its virtual B-channel based on virtual B attributes. The processors174 further provide transparent multiplexing of client data. VirtualB-channel monitor 176 carries out traffic and error monitoring of allvirtual B-channels, data traffic flow and allocation, day allocation andreplacement of channels to dynamically alter bandwidth are performed bythe monitor 176.

Call set-up/disconnect processor 178 sets up and disconnects protocol onthe D-channel. Processor 178 interfaces to B-channel hardware totransform the B-channel call set-up or disconnect, and interfaces withthe virtual B processors 174, resource manager 172 and client. HDLC/LAPDlinks 180 provide the variable links for clients, and are optional.

Component channels allocated for a virtual B-channel have the followingfour defined states: activated, deactivated, transient and steady. Inthe deactivated state, data transfer is forbidden although controlprotocol exchange is not. Component channels allocated or joined areinitially in the deactivated state. A channel, deactivated for a senderimmediately following the deactive₋₋ b command, described later, isqueued for transmission. For a receiver, a channel is deactivatedimmediately after the command is received. Only a bi-directionallydeactivated channel is removed and physically disconnected from thevirtual channel of which it was a member.

In the activated state, both data and control protocol transfer arepermitted. A channel is activated to a sender only after acknowledgementof the active₋₋ b command transmitted is received. For a receiver, achannel is activated immediately after this command is received.

The transient state is defined by guarding periods beforeacknowledgements are received from the far-end. A virtual channel istransient when any component channels are transient. No data can be sentover a channel in the transient state.

A component channel is in the steady state if it is not in the transientstate, that is, if it is activated or deactivated. A virtual channel isin the steady state if all its components are in the steady state.

A virtual B-channel is operative in two multiplexing modes, restrictedmode and forced load-balancing mode. In the restricted mode, datareceived for transmission is sequentially distributed, one packet at atime, in a round-robin fashion over the steady activated componentchannels; deactivated channels are skipped. The far-end virtual Bprocessor 174 receives and recovers data in the same round-robinsequence. In the load balancing mode of operation, the distribution fortransmissions over the channels follows a protocol ofmost-empty-channel-first for transmission. The receiver recovers it bythe global sequence numbers by scanning, comparing and carrying outtrace-back time-out presentation. During either distribution process,active₋₋ b commands, described below, are sent in-line on thedeactivated component channels. For component channels to bedeactivated, deactive₋₋ b commands are sent in-line over these channelsin place of the data in the sequence. Time-fill SYNC₋₋ vB packets may besent over channels in the restricted mode of operation to avoid "holes"in the data stream, and further can be used for time control in theload-balancing mode of operation.

By way of example, the following are command categories together withdetailed format and bit definitions, used for controlling andmultiplexing protocol. This protocol assumes the use of flow control tobe optional depending on implementation and environment. Whereas thefollowing protocol formats are for the restricted mode, theload-balancing mode is identical except that all the numbered commandcategory header-bytes described below will be two bytes in length.

Control and Multiplexing

The following are the command categories and their detailed format withbit definitions. This protocol assumes the use of flow control to beoptional, at least to some degree, depending on the implementation andenvironment. In the restricted mode, this can be controlled by clientlink level protocol; outstanding transmissions preferably should notresult in difference of 26 generations or more between the receiving andthe far-end transmitting loop. The load-balancing mode has the sameformat except that all the numbered command category header-bytesdescribed below will be two bytes in length.

DATA

Ossnnnnn: one byte as header of client's data for transmit.

RQST₋₋ Bs

101nnnnn: one byte header of one or multiple control bytes. The firstcontrol byte can further specify explicitly whether it is global. If itdoes not specify, it depends on the address bytes which follow. Noaddress byte for the in-band operation is required, and multiple addressbytes imply the in-band line is not explicitly included. The explicitglobal commands have the leftmost bit on, followed by explicitlyspecified address bytes. If the leftmost two bits are both on, it is abroadcast, and no address bytes follow. Multiple bytes are useful foroff-band control. At present, only one byte of in-band control isemployed. The leftmost third bit is reserved, and the fourth bit is forsystem control point specification. These are external or internalindicated by E and I respectively as follows. The last four bits definethe commands of this category. At present, these are:

DEACTIV₋₋ Bs group: uwx1z, w bit is reserved and u defines two systempoints.

DEL₋₋ Bs--(OXOO O), an external delete command

DEX₋₋ Bs--(DEL₋₋ Bs 1), an DEL₋₋ Bs, followed by external setup

DIL₋₋ Bs--(DEL₋₋ Bs 0X10), internally initiated delete command

DIX₋₋ Bs--(DEX₋₋ Bs 0X10), DIL₋₋ Bs, followed by internal setup

ACTIV₋₋ Bs group: uwxOz, w bit is reserved, u the same as defined above.

ADD₋₋ Bs--(0X00 2), an external add command.

AID₋₋ Bs--(ADD₋₋ Bs 0X10), an internally initiated ADD₋₋ Bs

SYNC₋₋ vB

110nnnnn: one byte only, used for time-fill and synchronization.

RA₋₋ Bs

111nnnnn: one byte header, followed by no or multiple optional bytes.This is an acceptance acknowledge in reply to a RQST₋₋ Bs, and in-bandis implied if no other bytes follow. Similar to the case in RQST₋₋ Bs,the first by which follows can further specify whether it is global. Theleftmost two bits have exactly the same meanings, which describe thescope of the possible further succeeding address bytes. The leftmostthird bit, if on, turns the whole meaning of the response into anegative acknowledgement, instead. The last five bits are the same asfor RQST₋₋ Bs.

MODE₋₋ vB

1000000m: for virtual channel operation and format specification. THishas two members, MODE₋₋ rst with m=0 and MODE₋₋ lbc with m=1; MODE₋₋ rstdefines the nnnnn five bit generation number in restricted mode. In theload-balancing mode, it handshakes with MODE₋₋ lbc, with thirteen (13)bits global sequence numbers, when opening a virtual B. The attributesof Table I to follow after these headers are optional. The modenegotiation can proceed only when all component channels are indeactivated states, or UNA will be received if the optional attributesare not accepted, UNA will also be received. A REJ will be received ifthe remote end does not support or will not accept this request. Inaddition to this role of mode negotiations, MODE₋₋ vB resets thegeneration number or the global sequence number for transmitter and thecorresponding variable back to 0 to restart and resets the transmitterand receiver (loop) pointers back to the first component position.

RR

10000010: Informs the far-end receiver that this end is ready.

10000011: Informs the far-end receiver that his end is not ready.

ATTRB₋₋ vB

100000100: The parameters in Table I follow this for far-endnegoziation.

UA

10010000: This unnumbered positive response means acceptance in the modenegotiation. The same MODE₋₋ vB packet will be sent back as bi-directioninitialization, following the UA. The UA is also used foracknowledgement to flow control commands RR and RNR. It is used foracceptance acknowledgement to ATTRB₋₋ vB as well as unnumbered commands.

UNA

10010100: a negative response for refusing, used similarly to UA.

REJ

10011100: as explained in the MODE₋₋ vB description.

All these unnumbered are in-band, although MODE₋₋ vB is for global. The"nnnnn" is a module 32 correlation generation number, or a zero basedglobal sequence number, assigned to each round of transmissions inrestricted mode of operation, or assigned and incremented by one foreach numbered transmission in the load balanced mode. The "ss" in theDATA command, which has four values 11, 10, 01 nd 11, is for framesegmentation.

Processing of these commands is independent of their arriving timingphase with respect to other channels, once dequeued. The sequencenumbers are for data synchronization across the component channels. Areceiver variable "nr", used for synchronization, is incremented by oneafter each round, or each actual numbered reception. This is a recoverprocess corresponding to the far-end sender's sequence number incrementfor each round, or each data or numbered command transmission.

Once mode negotiation is done, sequence number comparison is thenstarted. The selected virtual B processor 714 polls the receiving queueand then steps to the next component channel. In restricted mode, ifnothing arrives in the queue of an activated channel, the processorstays and waits indefinitely. In the case of MAC implementation, theprocessor waits indefinitely or steps after a time out period if atrace-back timer has been started, regardless of the channel states. Ata deactivated component channel, the processor hunts through allfollowing contiguous deactivated channels for any arrival, and doestrace-back get, steps or stays until the trace-back timer expires, ifarrival time inversion is found. The time-fill SYNC₋₋ vB commands are tobe received over their preceding channels, if no other commands or dataare available through these channels. The receptions in load-balancingmode are always in hunting mode, across the full range of componentchannels. The processor continues looking for the correct sequencenumber for presentation. Trace-back time-out presentation scheme appliesin either mode.

Parameters which characterize a virtual B-channel to be opened and usedto monitor the channel hereinafter are listed in Table I.

                                      TABLE I                                     __________________________________________________________________________    Virtual B Channel Attributes (in C language representation)                   __________________________________________________________________________    typedef struct                                                                long  err.sub.-- threshold;                                                                     /* one out of err.sub.-- threshold frames */                short err.sub.-- action.sub.-- thres;                                                           /* act on config err.sub.-- action.sub.-- thres */          short err.sub.-- action.sub.-- permit;                                                          /* allow deactivation of errored channel */                 short max.sub.-- band.sub.-- width;                                                             /* max allowed bandwidth */                                 short high.sub.-- util.sub.-- thres;                                                            /* high effective % band width threshold */                 short high.sub.-- busy.sub.-- util.sub.-- thres;                                                /* one high util out of high.sub.-- busy.sub.-- util                          */                                                          short high.sub.-- action.sub.-- thres;                                                          /* act on contig high.sub.-- busy.sub.-- util.sub.--                          thres */                                                    short high.sub.-- action.sub.-- permit;                                                         /* allow bandwidth increment actions */                     short min.sub.-- band.sub.-- width;                                                             /* minimum allowed bandwidth */                             short low.sub.-- util.sub.-- thres;                                                             /* low effective % bandwidth threshold */                   short low.sub.-- busy.sub.-- util.sub.-- thres;                                                 /* one low util out of low.sub.-- busy.sub.-- util */       short low.sub.-- action.sub.-- thres;                                                           /* act on contig low.sub.-- busy.sub.-- util.sub.--                           thres */                                                    short low.sub.-- action.sub.-- permit;                                                          /* allow bandwidth decrement actions */                     short set.sub.-- up.sub.-- retry.sub.-- thres;                                                  /* max contig retry before giving up */                     short no.sub.-- action.sub.-- thres;                                                            /* no action threshold time */                              VB.sub.-- THRESHOLD;                                                          __________________________________________________________________________

Traffic Sensing

Sensing of traffic for automatic control of bandwidth is carried out asfollows. Assuming that the sampling rate is one sample every twoseconds, the maximum bandwidth of the virtual channel opened is set tobe five B-channels, definition of the high₋₋ util thres is 75%, of ahigh₋₋ busy₋₋ util₋₋ thres is 5, the high action₋₋ thres is ten and theinitial channel opened is one B-channel (64 Kbps). As transmission rateincreases steadily from an original effective rate of 45 Kbps to 55Kbps, a procedure for adding a new line is automatically initiatedthirty seconds later. This assumes that the high₋₋ action₋₋ permit istrue. A new element channel is added and the new line utilization willbe 42.3% if traffic is maintained at 55 kbps. An increase in input datarate thus drives up bandwidth growth. If the input data rate continuesto increase, the bandwidth eventually will reach five B-channels as amaximum.

When traffic decreases, assuming that the low₋₋ util thres is 30%, andthe low₋₋ busy₋₋ util₋₋ thres and low action₋₋ thres are five and ten,respectively, no line will be deleted from the virtual B if a pattern ofthe driving traffic does not have a utilization of less than 30% in anycontinuous ten seconds or there is no consecutive repeating ten or moretimes. If the low action₋₋ permit is false, no reduction in virtualB-channels is permitted. The attributes of the virtual B thus define thebandwidth control behavior.

If line error rate is above a predefined threshold rate for apredetermined period of time, line replacement operations are reduced inaddition to bandwidth control.

Conclusion

Bandwidth of an ISDN line is dynamically allocated by a gateway GW inaccordance with the invention which monitors traffic to each destinationand in response allocates or deallocates virtual B-channels inaccordance with FIG. 18. A long term bandwidth allocation algorithm(LTA) shown in FIG. 14, determines when and for how long to allocateB-channels to a destination queue under typical traffic conditions; ashort term allocation algorithm (STA) allocates B-channels under otherconditions (FIG. 15). Bandwidth utilization is optimized by packagingand transmitting data packets in "trains". The trains are compressedusing a suitable data compression algorithm before transmission from thegateway to the ISDN.

In this disclosure, there is shown and described only the preferredembodiment of the invention, but, as aforementioned, it is to beunderstood that the invention is capable of use in various othercombinations and environments and is capable of changes or modificationswithin the scope of the inventive concept as expressed herein.

We claim:
 1. In a communication network characterized by a multiplicityof channels for carrying packets of data on a medium between dataservers and destinations, channel allocation apparatus, comprising:meansfor establishing input and output destination queues; data flowmetermeans for measuring quantity of data arriving at each said input andoutput destination queue during a particular time interval; means forpolling each said data flowmeter means at fixed intervals; long termchannel allocation means responsive to said polling means for allocatingor deallocating transmission channels to a particular destination onsaid medium depending upon data flow traffic to said destination andparticular channel parameters; and short term channel allocation means,overriding said long term channel allocation means in response topredetermined conditions, for allocating or deallocating transmissionchannels on said medium.
 2. The apparatus of claim 1, including meansfor assembling pluralities of packets into trains, each consisting of apredetermined number of packets, and means or transmitting said trainsonto said medium.
 3. The apparatus of claim 1, wherein saidpredetermined conditions include inactivity at a destination queue for atime period greater than a predetermined period.
 4. The apparatus ofclaim 1, wherein said predetermined conditions include an emptydestination queue.
 5. The apparatus of claim 1, wherein saidpredetermined conditions include a condition wherein a quantity of datadirected to a particular destination exceeds the capacity of availablechannels assigned to that destination.
 6. The apparatus of claim 5,wherein said data is arranged in trains consisting of a predeterminednumber of packets and said quantity of data is an accumulation of datacomprising each said train.
 7. The apparatus of claim 6, wherein eachsaid train is provided with a header.
 8. The apparatus of claim 6,wherein a unique number is assigned to each packet in a train.
 9. Theapparatus of claim 8, wherein said long term channel allocation meanscomprisesmeans for transmitting sampled data, one packet at a time, in amost-empty-channel-first transmission sequence; and means for recoveringsaid sampled data using sequence numbers and a trace-back time-outprocedure.
 10. The apparatus of claim 6, including means for receivingand rebuilding packets in accordance with said header.
 11. The apparatusof claim 1, wherein said long term channel allocation meanscomprisesmeans for transmitting sampled data, one packet at a time, in around-robin fashion over activated component channels of saidmultiplicity of channels, skipping deactivated channels of saidmultiplicity of channels; and means for receiving and recovering saiddata in the same round-robin sequence.